/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package javafx191labs.Bsissenkul.lab01;

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.shape.Circle;
import javafx.scene.paint.Color;
import javafx.scene.shape.Arc;
import javafx.scene.shape.ArcType;
import javafx.scene.shape.Ellipse;
import javafx.scene.shape.QuadCurve;
import javafx.scene.shape.Path;
import javafx.scene.shape.MoveTo;
import javafx.scene.shape.ArcTo;
import javafx.scene.shape.Line;
import javafx.scene.transform.Scale;
import javafx.animation.Timeline;
import javafx.animation.Interpolator;
import javafx.scene.text.Text;
import javafx.scene.text.Font;

/**
 * @author Baur
 */
 
 var X = 640;
 var Y = 480;
//анимация которая не получилась((
 var EyeLeftX = X-145;
 var EyeLeftY = Y+40;
 var EyeRightX = X+155;
 var EyeRightY = Y+40;
 var IsTextVisible = true;
 
 Timeline {
	repeatCount: 6
	keyFrames: [
	at (1s) {
            EyeLeftX => X-142 tween Interpolator.LINEAR;
            EyeLeftY => Y-10 tween Interpolator.LINEAR;
            EyeRightX => X+152 tween Interpolator.LINEAR;
            EyeRightY => Y-10 tween Interpolator.LINEAR;
            IsTextVisible => false
         }
        at(2s){
            EyeLeftX => X+152 tween Interpolator.LINEAR;
            EyeLeftY => Y-10 tween Interpolator.LINEAR;
            EyeRightX => X+152 tween Interpolator.LINEAR;
            EyeRightY => Y+80 tween Interpolator.LINEAR;
            IsTextVisible => true
        }
    ]
}.play();

 
Stage {
	title : "Бауржан"
	onClose: function () {  }
	scene: Scene {
		width: 640
		height: 480
		content: [
//голова
Arc {
	centerX: 320, centerY: 100
	radiusX: 40, radiusY: 20
	startAngle:0, length: 180
	type: ArcType.OPEN
	fill: Color.BLACK
}

Ellipse {
	centerX: 320, centerY: 100
	radiusX: 39, radiusY: 19
	fill: Color.WHITE
}

 //левое ухо
Arc {
	centerX: 265, centerY: 130
	radiusX: 40, radiusY: 40
	startAngle: 90, length: 180
	type: ArcType.OPEN
	fill: Color.BLACK
}

Ellipse {
	centerX: 265, centerY: 130
	radiusX: 39, radiusY: 39
	fill: Color.WHITE
}

Path {
	elements : [
		MoveTo {x : 285.0, y : 95.0},
                ArcTo {x : 265.0, y : 90.0 radiusX : 150.0, radiusY :150.0}]
                fill: Color.BLACK
}

Path {
	elements : [
		MoveTo {x : 285.0, y : 165.0},
                ArcTo {x : 265.0, y : 170.0 radiusX : 150.0, radiusY : 150.0}]
}

//ушная раковина левого уха

Arc {
	centerX: 265, centerY: 130
	radiusX: 27, radiusY: 27
	startAngle: 90, length: 180
	type: ArcType.OPEN
	fill: Color.BLACK
}

Ellipse {
	centerX: 265, centerY: 130
	radiusX: 26, radiusY: 26
	fill: Color.WHITE
}

//правое ухо

Arc {
	centerX: 375, centerY: 130
	radiusX: 40, radiusY: 40
	startAngle: 270, length: 180
	type: ArcType.OPEN
	fill: Color.BLACK
}

Ellipse {
	centerX: 375, centerY: 130
	radiusX: 39, radiusY: 39
	fill: Color.WHITE
}

Path {
	elements : [
		MoveTo {x : 355.0, y : 95.0},
                ArcTo {x : 375.0, y : 90.0 radiusX : 0.0, radiusY : 0.0}]
}

Path {
	elements : [
		MoveTo {x : 355.0, y : 165.0},
                ArcTo {x : 375.0, y : 170.0 radiusX : 0.0, radiusY : 0.0}]
}

//ушная раковина правого уха

Arc {
	centerX: 375, centerY: 130
	radiusX: 27, radiusY: 27
	startAngle: 270, length: 180
	type: ArcType.OPEN
	fill: Color.BLACK
}

Ellipse {
	centerX: 375, centerY: 130
	radiusX: 26, radiusY: 26
	fill: Color.WHITE
}


//подбородок
Arc {
	centerX: 320, centerY: 160
	radiusX: 40, radiusY: 20
	startAngle: 180, length: 180
	type: ArcType.OPEN
	fill: Color.BLACK
}

Ellipse {
	centerX: 320, centerY: 160
	radiusX: 39, radiusY: 19
	fill: Color.WHITE
}

//левое плечо

Arc {
	centerX: 200, centerY: 220
	radiusX: 30, radiusY: 30
	startAngle: 75, length: 150
	type: ArcType.OPEN
	fill: Color.BLACK
}

Ellipse {
	centerX: 200, centerY: 220
	radiusX: 29, radiusY: 29
	fill: Color.WHITE
}

//правое плечо
Arc {
	centerX: 440, centerY: 220
	radiusX: 30, radiusY: 30
	startAngle: 315, length: 150
	type: ArcType.OPEN
	fill: Color.BLACK
}

Ellipse {
	centerX: 440, centerY: 220
	radiusX: 29, radiusY: 29
	fill: Color.WHITE
}

//левая трапеция мышц

Line {
	startX: 283, startY: 168
	endX: 207, endY: 192
	strokeWidth: 1
	stroke: Color.BLACK
}

//правая трапеция мыщц

Line {
	startX: 357, startY: 168
	endX: 433, endY: 192
	strokeWidth: 1
	stroke: Color.BLACK
}

// левая ключица

Line {
	startX: 208, startY: 193
	endX: 300, endY: 198
	strokeWidth: 1
	stroke: Color.BLACK
}

// правая ключица

Line {
	startX: 432, startY: 193
	endX: 340, endY: 198
	strokeWidth: 1
	stroke: Color.BLACK
}

//нос
Ellipse {
	centerX: 320, centerY: 140
	radiusX: 12, radiusY: 7
	fill: Color.BLACK
}
//левый глаз

Arc {
	centerX: 310, centerY: 120
	radiusX: 15, radiusY: 15
	startAngle: 50, length: 110
	type: ArcType.OPEN
	fill: Color.BLACK
}

Ellipse {
	centerX: 310, centerY: 120
	radiusX: 14, radiusY: 14
	fill: Color.WHITE
}

Path {
	elements : [
		MoveTo {x : 296.0, y : 115.0},
                ArcTo {x : 315.0, y : 140.0 radiusX : 10.0, radiusY : 15.0}]
}


//правый глаз
Arc {
	centerX: 330, centerY: 120
	radiusX: 15, radiusY: 15
	startAngle: 390, length: 110
	type: ArcType.OPEN
	fill: Color.BLACK
}

Ellipse {
	centerX: 330, centerY: 120
	radiusX: 14, radiusY: 14
	fill: Color.WHITE
}

Path {
elements : [
                MoveTo {x : 344.0, y : 113.0},
                ArcTo {x : 363.0, y : 140.0 radiusX : 10.0, radiusY : 15.0}]
scaleX: -1
scaleY: 1
translateX: -16
translateY: 0
                }

// рот

Arc {
	centerX: 320, centerY: 160
	radiusX: 15, radiusY: 10
	startAngle: 180, length: 180
	type: ArcType.OPEN
	fill: Color.BLACK
}

Ellipse {
	centerX: 320, centerY: 160
	radiusX: 14, radiusY: 9
	fill: Color.WHITE
}


//левая  бипципца

Arc {
	centerX: 180, centerY: 270
	radiusX: 20, radiusY: 40
	startAngle: 90, length: 180
	type: ArcType.OPEN
	fill: Color.BLACK
}

Ellipse {
	centerX: 180, centerY: 270
	radiusX: 19, radiusY: 39
	fill: Color.WHITE
}

Arc {
	centerX: 220, centerY: 270
	radiusX: 15, radiusY: 35
	startAngle: 270, length: 180
	type: ArcType.OPEN
	fill: Color.BLACK
}

Ellipse {
	centerX: 220, centerY: 270
	radiusX: 14, radiusY: 34
	fill: Color.WHITE
}

// правая бипципца

Arc {
	centerX: 460, centerY: 270
	radiusX: 20, radiusY: 40
	startAngle: 270, length: 180
	type: ArcType.OPEN
	fill: Color.BLACK
}

Ellipse {
	centerX: 460, centerY: 270
	radiusX: 19, radiusY: 39
	fill: Color.WHITE
}

Arc {
	centerX: 420, centerY: 270
	radiusX: 15, radiusY: 35
	startAngle: 90, length: 180
	type: ArcType.OPEN
	fill: Color.BLACK
}

Ellipse {
	centerX: 420, centerY: 270
	radiusX: 14, radiusY: 34
	fill: Color.WHITE
}

//левая локоть

Arc {
	centerX: 190, centerY: 328
	radiusX: 20, radiusY: 20
	startAngle: 110, length: 180
	type: ArcType.OPEN
	fill: Color.BLACK
}

Ellipse {
	centerX: 190, centerY: 328
	radiusX: 19, radiusY: 19
	fill: Color.WHITE
}

// правая локоть

Arc {
	centerX: 453, centerY: 328
	radiusX: 20, radiusY: 20
	startAngle: 250, length: 180
	type: ArcType.OPEN
	fill: Color.BLACK
}

Ellipse {
	centerX: 453, centerY: 328
	radiusX: 19, radiusY: 19
	fill: Color.WHITE
}



// левая грудь

Path {
	elements : [MoveTo {x : 310.0, y : 278.0},
        ArcTo {x : 240.0, y : 273.0 radiusX : 13.0, radiusY : 10.0}]

scaleX: 1
scaleY: -1
}

//правая грудь

Path {
	elements : [
		MoveTo {x : 330.0, y : 253.0},
                ArcTo {x : 400.0, y : 248.0 radiusX : 13.0, radiusY : 10.0}]
scaleX: -1
scaleY: 1
}

// левое крыло

Line {
	startX: 230, startY: 295
	endX: 235, endY: 345
	strokeWidth: 1
	stroke: Color.BLACK
}

// правое крыло

Line {
	startX: 410, startY: 295
	endX: 405, endY: 345
	strokeWidth: 1
	stroke: Color.BLACK
}


//пояс

Circle {
	centerX: 320, centerY: 360
	radius: 20
	fill: Color.BLACK
}

Circle {
	centerX: 320, centerY: 360
	radius: 19
	fill: Color.WHITE
}

Line {
	startX: 235, startY: 343
	endX: 303, endY: 350
	strokeWidth: 1
	stroke: Color.BLACK
}

Line {
	startX: 235, startY: 343
	endX: 235, endY: 363
	strokeWidth: 1
	stroke: Color.BLACK
}

Line {
	startX: 235, startY: 363
	endX: 303, endY: 370
	strokeWidth: 1
	stroke: Color.BLACK
}

Line {
	startX: 405, startY: 343
	endX: 337, endY: 350
	strokeWidth: 1
	stroke: Color.BLACK
}

Line {
	startX: 405, startY: 343
	endX: 405, endY: 363
	strokeWidth: 1
	stroke: Color.BLACK
}

Line {
	startX: 405, startY: 363
	endX: 337, endY: 370
	strokeWidth: 1
	stroke: Color.BLACK
}

// окончание левой руки

Line {
	startX: 220, startY: 305
	endX: 230, endY: 310
	strokeWidth: 1
	stroke: Color.BLACK
}

Line {
	startX: 195, startY: 345
	endX: 235, endY: 360
	strokeWidth: 1
	stroke: Color.BLACK
}

// окончание правой руки

Line {
	startX: 420, startY: 305
	endX: 410, endY: 310
	strokeWidth: 1
	stroke: Color.BLACK
}

Line {
	startX: 448, startY: 345
	endX: 405, endY: 360
	strokeWidth: 1
	stroke: Color.BLACK
}

Text {
	font : Font {size: 24}
	x: 240, y: 50
	content: "МЕГА КАЧОК"
        visible: bind IsTextVisible
}




                ]
	}
}

